#include <bits/stdc++.h>
using namespace std;
int n;
int N = 1e4 + 10;
int main() {
    //freopen("in.in", "r", stdin);
    int a[N], b[N];
    cin >> n;
    for(int i = 0; i < n; i++) {
        cin >> a[i];
        b[a[i]]++;
    }
    for(int i = 0; i < n; i++) {
        if(b[a[i]] > n/2) {
            cout << a[i] << endl;
            break;
        }
    }
    return 0;
}